package com.tiny.factory.pizzafm;

/**
 * Created by zhumenglong on 2017/4/2.
 */
public class ChicagoPizzaStore extends PizzaStore {

    Pizza createPizza(String item) {
        if (item.equals("cheese")) {
            return new ChicagoStyleCheesePizza();
        } else if (item.equals("veggie")) {
            return new ChicagoStyleVeggiePizza();
        } else if (item.equals("clam")) {
            return new ChicagoStyleClamPizza();
        } else if (item.equals("pepperoni")) {
            return new ChicagoStylePepperoniPizza();
        } else return null;
    }

    protected class ChicagoStyleCheesePizza extends Pizza {
        public ChicagoStyleCheesePizza() {
            name = "Chicago Style Deep Dish Cheese Pizza";
            dough = "Extra Thick Crust Dough";
            sauce = "Plum Tomato Sauce";

            toppings.add("Shredded Mozzarella Cheese");
        }

        void cut() {
            System.out.println("Cutting the pizza into square slices");
        }
    }

    protected class ChicagoStyleVeggiePizza extends Pizza {
        public ChicagoStyleVeggiePizza() {
            name = "Chicago Deep Dish Veggie Pizza";
            dough = "Extra Thick Crust Dough";
            sauce = "Plum Tomato Sauce";

            toppings.add("Shredded Mozzarella Cheese");
            toppings.add("Black Olives");
            toppings.add("Spinach");
            toppings.add("Eggplant");
        }

        void cut() {
            System.out.println("Cutting the pizza into square slices");
        }
    }

    protected class ChicagoStyleClamPizza extends Pizza {
        public ChicagoStyleClamPizza() {
            name = "Chicago Style Clam Pizza";
            dough = "Extra Thick Crust Dough";
            sauce = "Plum Tomato Sauce";

            toppings.add("Shredded Mozzarella Cheese");
            toppings.add("Frozen Clams from Chesapeake Bay");
        }

        void cut() {
            System.out.println("Cutting the pizza into square slices");
        }
    }

    protected class ChicagoStylePepperoniPizza extends Pizza {
        public ChicagoStylePepperoniPizza() {
            name = "Chicago Style Pepperoni Pizza";
            dough = "Extra Thick Crust Dough";
            sauce = "Plum Tomato Sauce";

            toppings.add("Shredded Mozzarella Cheese");
            toppings.add("Black Olives");
            toppings.add("Spinach");
            toppings.add("Eggplant");
            toppings.add("Sliced Pepperoni");
        }

        void cut() {
            System.out.println("Cutting the pizza into square slices");
        }
    }
}
